<template>
	<view class="container">
		<view class="subsite-banner"><image :src="news_show.thumb" mode="widthFix">
		</view>
		<!-- News -->
		<view class="subsite subsite-with-banner">
			<view class="subsite-heading">
				<view class="section-main-title fz18">{{news_show.title}}</view>
				<view class="user-date-list">
					<view class="user-date-item">
						<uni-icons type="person-filled" color="#f45905" size="14" class="mr10"></uni-icons>{{news_show.username}}</view>
					<view class="user-date-item">
							<uni-icons type="list" color="#f45905" size="14" class="mr10"></uni-icons>{{formatTime(news_show.inputtime,1)}}</view>
				</view>
			</view>
			<view class="post-content">
				<u-parse :content="news_show.content" ></u-parse>
			</view>	
		</view>
		<!-- News end-->
		<!-- Footer -->
		<relation></relation>
		<!-- Footer end-->
		<u-tabbar></u-tabbar>
	</view>
</template>

<script>
	import uParse from '@/components/gaoyia-parse/parse.vue';
	import relation from'../public/relation.vue';
	import base from '../../js/base.js';
	import app from '../../js/app.js';
	export default {
		components:{
			relation,uParse
		},
		data() {
			return {
				news_id:0,
				news_show:{}
			}
		},
		onLoad(opt) {
			this.news_id = opt.news_id;
			let This = this;
			base.request({
				url:base.urltext('/itorder/info_port/news_show'),
				header:{ 'content-type': 'application/x-www-form-urlencoded' },
				data:{
					id:This.news_id
				},
				success:function(res){
					if(res.data.success>0)
					{
						//res.data.list.content=res.data.list.content.replace('<img',"<img style='width:100%' ");
						
						This.news_show = res.data.list;						
					}
				}
			})
		},
		methods: {
			formatTime:function(e,b=1){
				return base.formatTime(e,b);
			},
		}
	}
</script>

<style>
	@import url("/components/gaoyia-parse/parse.css");
</style>
